package com.woniuxy.main.handler;

import com.woniuxy.main.pojo.User;
import com.woniuxy.main.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author Su
 */
@Controller
@RequestMapping("/user")
public class UserHandler {
	@Resource
	private UserService userService;
	
	
	
	
	@RequestMapping("/all")
	@ResponseBody
    public String all() throws Exception {
		ModelAndView modelAndView = new ModelAndView();
        List<User> users = userService.findAll();
		System.out.println(users);
		
		return "";
	}

	@RequestMapping("del")
	public void delete(){
		System.out.println("删除");
	}
	
	
}
